-
Notifications
You must be signed in to change notification settings - Fork 0
[PWGCF] Adding the option to reject half the FT0 #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds configuration switches to selectively exclude (reject) FT0A/FT0C inner- and outer-ring channels when building TPC–FT0 correlations, enabling eta-dependent studies with partial FT0 acceptance.
Changes:
- Added new configurables to reject FT0A/FT0C inner/outer ring channels.
- Introduced FT0 channel range constants (inner/outer, A/C) to support the rejection logic.
- Applied the rejection during the FT0 channel loop in
fillCorrelationsTPCFT0().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| int chanelid = 0; | ||
| float ampl = 0.; | ||
| getChannel(ft0, iCh, chanelid, ampl, corType); | ||
| if (corType == kFT0C) { | ||
| if ((cfgRejectFT0CInside && (chanelid >= kFT0CInnerRingMin && chanelid <= kFT0CInnerRingMax)) || (cfgRejectFT0COutside && (chanelid >= kFT0COuterRingMin && chanelid <= kFT0COuterRingMax))) { | ||
| continue; | ||
| } | ||
| } else if (corType == kFT0A) { | ||
| if ((cfgRejectFT0AInside && (chanelid >= kFT0AInnerRingMin && chanelid <= kFT0AInnerRingMax)) || (cfgRejectFT0AOutside && (chanelid >= kFT0AOuterRingMin && chanelid <= kFT0AOuterRingMax))) { | ||
| continue; | ||
| } | ||
| } |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When rejection is enabled, the code still calls getChannel() (which fills FT0Amp/FT0AmpCorrect and applies gain correction) before checking whether the channel will be rejected. This adds avoidable work inside the track×channel nested loop and also means the FT0Amp QA histograms still include channels that are “rejected”. Consider checking the channel id/range before calling getChannel(), or moving the rejection logic into getChannel() so rejected channels are skipped/zeroed consistently and without extra fills.
| int chanelid = 0; | |
| float ampl = 0.; | |
| getChannel(ft0, iCh, chanelid, ampl, corType); | |
| if (corType == kFT0C) { | |
| if ((cfgRejectFT0CInside && (chanelid >= kFT0CInnerRingMin && chanelid <= kFT0CInnerRingMax)) || (cfgRejectFT0COutside && (chanelid >= kFT0COuterRingMin && chanelid <= kFT0COuterRingMax))) { | |
| continue; | |
| } | |
| } else if (corType == kFT0A) { | |
| if ((cfgRejectFT0AInside && (chanelid >= kFT0AInnerRingMin && chanelid <= kFT0AInnerRingMax)) || (cfgRejectFT0AOutside && (chanelid >= kFT0AOuterRingMin && chanelid <= kFT0AOuterRingMax))) { | |
| continue; | |
| } | |
| } | |
| // Use preliminary channel id derived from index to perform rejection | |
| int chanelid = static_cast<int>(iCh); | |
| if (corType == kFT0C) { | |
| if ((cfgRejectFT0CInside && (chanelid >= kFT0CInnerRingMin && chanelid <= kFT0CInnerRingMax)) || | |
| (cfgRejectFT0COutside && (chanelid >= kFT0COuterRingMin && chanelid <= kFT0COuterRingMax))) { | |
| continue; | |
| } | |
| } else if (corType == kFT0A) { | |
| if ((cfgRejectFT0AInside && (chanelid >= kFT0AInnerRingMin && chanelid <= kFT0AInnerRingMax)) || | |
| (cfgRejectFT0AOutside && (chanelid >= kFT0AOuterRingMin && chanelid <= kFT0AOuterRingMax))) { | |
| continue; | |
| } | |
| } | |
| float ampl = 0.; | |
| // Only retrieve channel information (and trigger its QA) for non-rejected channels | |
| getChannel(ft0, iCh, chanelid, ampl, corType); |
| int chanelid = 0; | ||
| float ampl = 0.; | ||
| getChannel(ft0, iCh, chanelid, ampl, corType); | ||
| if (corType == kFT0C) { | ||
| if ((cfgRejectFT0CInside && (chanelid >= kFT0CInnerRingMin && chanelid <= kFT0CInnerRingMax)) || (cfgRejectFT0COutside && (chanelid >= kFT0COuterRingMin && chanelid <= kFT0COuterRingMax))) { |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable name chanelid looks like a typo and makes the new rejection logic harder to read/grep. Consider renaming to channelId (and adjusting related uses) for clarity.
Adding the option to reject half of the FT0 detectors to eta dependent studies